<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
	<style type="text/css">
		body{
			margin-top:50px;
		}
		input,
		.page-header{
			background-color:rgb(240, 245, 248);
		}
		
		#beijing{
			width:400px;
			height:100px;
		}
		
		#telsort{
			display : inline;
		}
	</style>
	
</head>
<body>
	<div class="navbar navbar-fixed-top">
	  <div class="navbar-inner">
		<div class="container">
			<a class="brand" href="#">
			  <img src="img/user_group.png" alt="" />&nbsp;客户关系管理系统
			</a>
			<ul class="nav">
			  <li>
				<a href="welcome.action">概览</a>
			  </li>
			  <li><a href="contacts.action">通讯录</a></li>
			  <li><a href="tasks.action">任务</a></li>
			  <li><a href="chances.action">机会</a></li>
			  <li><a href="discuss.action">讨论</a></li>
			  <li class="dropdown" id="menutest1">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#menutest1">
				  添加
				  <b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
				  <li><a href="new_contact.action"><i class="icon-user"></i>&nbsp;联系人</a></li>
				  <li><a href="new_company.action"><i class="icon-home"></i>&nbsp;公司</a></li>
				  <li class="divider"></li>
				  <li><a href="new_task.action"><i class="icon-ok"></i>&nbsp;任务</a></li>
				  <li><a href="new_chance.action"><i class="icon-star-empty"></i>&nbsp;机会</a></li>
				</ul>
			  </li>
			  
			</ul>
			
			<ul class="nav pull-right" >
			  <li>
				<a href="#">${user.username }</a>
			  </li>
			  <li class="dropdown" id="menutest2">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#menutest2">
				  管理
				  <b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
				   <li><a href="manage_user.action?id=${sessionScope.user.id }"><i class="icon-user"></i>&nbsp;同事</a></li>
				  <li><a href="manage_group.action"><i class="icon-list-alt"></i>&nbsp;组</a></li>
				  <li class="divider"></li>
				<!--  <li><a href="user_update_user.action?id=${sessionScope.user.id }"><i class="icon-asterisk"></i>&nbsp;账号</a></li> -->
				  <li><a href="show_user_msg.action?id=${sessionScope.user.id }"><i class="icon-asterisk"></i>&nbsp;账号</a></li>
				</ul>
			  </li>
			  <li class="divider-vertical"></li>
			  <li><a href="sign_in.action">退出</a></li>
			</ul>
			
		</div>
	  </div>
	</div>
	
	<div class="container">
		
			<div class="row">
				  <div class="span2"></div>
				  <div class="span8">
					
						<div class="page-header well">
									  <h2><img src="img/contact_list.png" alt="" />&nbsp;修改账号资料</h2>	
						</div>	
						
	<div class="page-header well">
		<form id="myform" class="form-horizontal"  action="show_delete_contacts.action?id=${contacts.id }"  method="post" >
		  <fieldset>
			<legend>${user.username }&nbsp;&nbsp;成员的详细资料</legend>
			
						<div class="control-group">
						  <label class="control-label">账号</label>
						  <div class="controls">
							<input type="text" name="contacts.name" value="${user.username}">
						  </div>
						</div>
						
						<div class="control-group">
						  <label class="control-label">密码</label>
						  <div class="controls">
							<input type="text"  name="contacts.companyname" value="${ user.password}">
						  </div>
						</div>
						<div class="control-group">
						  <label class="control-label">邮箱</label>
						  <div class="controls">
							<input type="text"  name="contacts.companyname"  value="${ user.email}">
						  </div>
						</div>
			
			
			<div class="control-group">
			  <label class="control-label"></label>
			  <div class="controls">
				
				<button id="button1" class="btn btn-success" type="button">
				  保存修改
				</button>
				<button id="button2" class="btn" type="button">
				  取消
				</button>
			  </div> 
			</div>
			  
			
		  </fieldset>
		</form>					
	</div>	
						
						
						
				  </div>
				  <div class="span4">
						<div class="page-header well">
							<h3>通讯录管理</h3>
							<table class="table">
							  <tbody>
								<tr>
								  <td><img src="img/contacts.png" alt="" /><a href="new_contact.action">添加联系人</a></td>
								</tr>
								<tr>
								  <td><img src="img/company.png" alt="" /><a href="new_company.action">添加公司</a></td>
								</tr>
								<tr>
								  <td><img src="img/company.png" alt="" /><a href="show_delete_contacts.action">修改联系对象</a></td>
								</tr>
								<tr>
								  <td><img src="img/company.png" alt="" /><a href="show_delete_contacts.action">删除联系对象</a></td>
								</tr>
								<tr>
								  <td><img src="img/company.png" alt="" /><a href="show_back_contacts.action">恢复联系对象</a></td>
								</tr>
								<tr>
								  <td><img src="img/export_to_document.png" alt="" /><a href="">导入联系人</a></td>
								</tr>
								<tr>
								  <td><img src="img/export.png" alt="" /><a href="">导出联系人</a></td>
								</tr>
							  </tbody>
							</table>
						</div>	
						
				  </div>
				</div>
			</div>
	
		
	<script type="text/javascript">
		
		
	
		$(document).ready(function(){
			
			$("#button1").click(function(){
					$("#myform").attr("action","update_user.action");
					$("#myform").submit();
			});
			
			$("#button2").click(function(){
					$("#myform").attr("action","cancel_update_user.action");
					$("#myform").submit();
			});
			
		
			$("#new_task").click(function(){
				$('#myModal').modal({
					backdrop:true,
					keyboard:true,
					show:false
				});
			});

			
		});
		
		
	</script>
</body>
</html>